<?php
/* @var $this PostController */
/* @var $model Post */

$this->breadcrumbs=array(
	'Posts'=>array('index'),
	'Manage',
);

// $this->menu=array(
// 	array('label'=>'List Post', 'url'=>array('index')),
// 	array('label'=>'Create Post', 'url'=>array('create')),
// );
?>

<h1><?php echo Yii::t('app', 'Manage Posts'); ?></h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'post-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
				'name' => Yii::t('app', 'id'), 
				'filter' => false, 
				'htmlOptions' => array('class' => 'center', 'style' => 'width:5%')),
		array(
				'name' => Yii::t('app', 'thumbnail'),
				'type' => 'html',
				'filter' => false,
				'value' => '( $data->thumbnail )
							? CHtml::image($data->thumbnail, "", array("style"=>"width:50px;height:50px;"))
							: "no image"',
				'htmlOptions' => array('style' => 'width:50px')
		),
		array(
			'name' => Yii::t('app', 'title'), 
			'htmlOptions' => array('style' => 'width:20%')
		),
		array(
			'header' => Yii::t('app', 'Product Category Title'),	
			'name' => 'postCategory.title', 
			'filter' => array(), 
			'htmlOptions' => array('style' => 'width:20%')
		),
		Yii::t('app', 'quote'),
		Yii::t('app', 'is_feature'),
		Yii::t('app', 'status'),
		Yii::t('app', 'date_created'),
		Yii::t('app', 'date_edited'),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
